home *** CD-ROM | disk | FTP | other *** search
/ Interactive Media Design Review 1999 / Interactive Media Design Review 1999.iso / pc / Demos / Bombardier_PC / BSCRIPTS.CST / 00020_Script_animationV-UD < prev    next >
Text File  |  1999-04-25  |  1KB  |  59 lines

  1. -- ⌐ 1998 @radical.media, inc. & Concurrent New Media Group, L.L.C.
  2. -- Developed for Bombardier, Inc.
  3. --
  4. -- All programming developed by: 
  5. -- Robert Fabricant, Valerie Valoueva, Ossi Shaked, 
  6. -- Henry Sauvageot, Chris Howell & Chris Girand
  7. --
  8. -- Use of this code by parties other than @radical.media, inc. or their
  9. --agents 
  10. -- without the express written consent of @radical.media, inc. AND Concurrent 
  11. -- New Media Group, L.L.C. is strictly prohibited.
  12. ------------------------------------------------------
  13.  
  14. on getBehaviorDescription
  15.   return "simulates 2D object movie."
  16. end
  17.  
  18. on mousedown
  19.   global oldIndex,sseq,eseq, oldH
  20.  
  21.   repeat while the mouseDown
  22.     set index = the mouseV
  23.     set curH = the mouseH
  24.     set changeH = abs(oldH - curH)
  25.     set changeV = abs(index-oldIndex)
  26.     if changeH >= changeV then
  27.       set movedHoris = TRUE
  28.     else
  29.       set movedHoris = FALSE
  30.     end if
  31.     
  32.     
  33.     if not(movedHoris) then
  34.       if index > oldIndex and oldIndex <> 0  then
  35.         if the frame < eseq then go to the frame +1
  36.         
  37.       else 
  38.         if index < oldIndex and oldIndex <> 0 then
  39.           if the frame > sseq then go to the frame -1
  40.           
  41.         end if
  42.       end if
  43.     end if
  44.     
  45.     updateStage
  46.     set oldIndex = index
  47.     set oldH = curH
  48.   end repeat
  49.   pass
  50. end
  51.  
  52. on mouseup 
  53.   global oldIndex, oldH
  54.   set oldIndex = 0
  55.   set oldH = 0
  56.   pass
  57. end
  58.  
  59.